<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
		<meta charset="UTF-8">
		<title>华阳</title>
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/css/bootstrap.css"/>
		<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/css/bootstrap.min.css" />
		
		<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/css/bootstrap-theme.css" />
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/css/bootstrap-theme.min.css"/>
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/css/style.css"/>
		<link href="<%=request.getContextPath()%>/resources/css/jquery-ui.min.css" rel="stylesheet" />
		<link href="<%=request.getContextPath()%>/resources/css/jquery-ui-timepicker-addon.min.css" rel="stylesheet" />
		<script src="<%=request.getContextPath()%>/resources/js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=request.getContextPath()%>/resources/js/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=request.getContextPath()%>/resources/js/jquery-ui-timepicker-addon.min.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/jquery-ui-timepicker-zh-CN.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/resources/jedate/jedate.js"></script>
		<script type="text/javascript">
			(function($) {

				$(function() {
					$.datepicker.regional['zh-CN'] = {
						changeMonth: true,
						changeYear: true,
						clearText: '清除',
						clearStatus: '清除已选日期',
						closeText: '关闭',
						closeStatus: '不改变当前选择',
						prevText: '<上月',
						prevStatus: '显示上月',
						prevBigText: '<<',
						prevBigStatus: '显示上一年',
						nextText: '下月>',
						nextStatus: '显示下月',
						nextBigText: '>>',
						nextBigStatus: '显示下一年',
						currentText: '今天',
						currentStatus: '显示本月',
						monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
						monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
						monthStatus: '选择月份',
						yearStatus: '选择年份',
						weekHeader: '周',
						weekStatus: '年内周次',
						dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
						dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
						dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
						dayStatus: '设置 DD 为一周起始',
						dateStatus: '选择 m月 d日, DD',
						dateFormat: 'yy-mm-dd',
						firstDay: 1,
						initStatus: '请选择日期',
						isRTL: false
					};

				});

				$(function() {

					$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
					
					$(".timepick").datetimepicker();

				});
				
				
			}(jQuery));
		</script>
		<style type="text/css">
			*{
				margin:0;
				padding:0;
			}
			<!-- 
                BODY {background: url(<%=request.getContextPath()%>/resources/img/body-back.jpg) no-repeat;background-position: 0px 0px; background-attachment:fixed;}              
            --> 
		</style>
	</head>
	<body>
		<div class="header">
			<div class="header-content">
	            <div class="row clearfix">		          
		            <div class="logo">
		                <img src="<%=request.getContextPath()%>/resources/img/raw_1514433813.png"/>
		            </div>
		            <div class="tab-list">
		                <ul id="tablist">
                             <li class="tab1">
                            	<a href="${ctx }/department/showDept"><div class="tab-ico"></div></a>                            	
                            </li>
                            <li class="tab2">
                            	<a href="${ctx }/drivers/add_driver?pageNow=1"><div class="tab-ico"></div></a>  
                            </li>
                            <li class="tab6  tabin">
                            	<a href="${ctx }/accident/showAccident?pageNow=1"><div class="tab-ico"></div></a>  
                            </li>
                            <li class="tab4">
                            	<a href="${ctx }/after/showAfter?pageNow=1"><div class="tab-ico"></div></a>  
                            </li>
                            <li class="tab5">
                            	<a href="${ctx }/accountlist/selectAccountList"><div class="tab-ico"></div></a>  
                            </li>
                            <li class="tab3">
                            	<a href="${ctx }/back/guanli"><div class="tab-ico"></div></a>  
                            </li>
                            <div class="clearfix">
                            </div>
                        </ul>
		            </div>
		            <div class="top-user">
		            	<div class="user-ico">
		            		<img src="<%=request.getContextPath()%>/resources/img/raw_1514434504.jpg"/>
		            	</div>
		            	<div class="user-class">
		            		<p>${user.uname}</p>
		            		<p>${role.rolename}</p>
		            	</div>
		            	<div class="user-back">
		            		<a id=HyperLink3 onclick="logout()" href="javascript:window.opener=null;%20window.close();"><<%=request.getContextPath()%>/resources/img src="img/raw_1514434766.png"/></a>
		            	</div>
		            	<div class="clearfix"></div>
		            </div>
		            <div class="clearfix"></div>
	            </div>
            </div>
		</div>
		<div class="contet-box" id="contet-box">		
			<div class="content">
				<div class="container">
	                <div class="row clearfix">
		                <div class="column container_form"  data-example-id="inline-checkboxes-radios">
			                <form action="${ctx }/accident/updateAccident" method="post" role="form" class="col-center-block">
			                	<div class="col-md-6 form-group input-group-three">
			                	<p class="text-left">修改事故</p>
								<input type="hidden" name="acid" value="${accident.acid }">
			                	<div class="input-group">
								    <div class="input-group-addon">姓名：</div>
                                    <input type="text" name="acname" id="acname" value="${accident.acname }" class="form-control">
							    </div>
				                <div class="input-group">
								    <div class="input-group-addon">地点：</div>
                                    <input type="text" name="acsite" id="acsite" value="${accident.acsite }" class="form-control">
							    </div>
				                <div class="input-group">
								    <div class="input-group-addon">时间：</div>
                                    <input type="text" name="actime" id="actime" class="form-control timepick" placeholder="<fmt:formatDate value='${accident.actime }'   pattern="yyyy-MM-dd   HH:mm:ss"/>">
							    </div>
				                <div class="input-group">
								    <div class="input-group-addon">是否有人受伤：</div>
                                    <input type="text" name="acbruise" id="acbruise" value="${accident.acbruise }" class="form-control">
							    </div>
				                <div class="input-group">
								    <div class="input-group-addon">事故责任：</div>
                                    <input type="text" name="acduty" id="acduty" value="${accident.acduty }" class="form-control">
							    </div>
				                <div class="input-group">
								    <div class="input-group-addon">事故受损金额：</div>
                                    <input type="text" name="acdamaged" id="acdamaged" value="${accident.acdamaged }" class="form-control">
							    </div>
							    <div class="input-group">
								    <div class="input-group-addon">厂家处罚金额：</div>
                                    <input type="text" name="acpunish" id="acpunish" value="${accident.acpunish }" class="form-control">
							    </div>
							    <div class="input-group">
								    <div class="input-group-addon">上级处罚金额：</div>
                                    <input type="text" name="acpenalty" id="acpenalty" value="${accident.acpenalty }" class="form-control">
							    </div>
				                <div class="input-group">
								    <div class="input-group-addon">所属运单（ID）：</div>
                                    <input type="text" name="acwaybill" id="acwaybill" value="${accident.acwaybill }" class="form-control">
							    </div>
				     
				                <div class="form-group">
				                     <label class="radio-inline">
                                                                               事故是否处理完毕：
										<input type="hidden" id="acdispose" value="${accident.acdispose }">
                                     </label>
					                 <label class="radio-inline">
                                       <input type="radio" name="acdispose" id="acdispose1" value="是"> 是
                                     </label>
                                     <label class="radio-inline">
                                       <input type="radio" name="acdispose" id="acdispose2" value="否"> 否
                                     </label>
				                </div>
				                </div>
				                <div class="clearfix"></div>
				                <div class="form-group detail-button clearfix">
					                <div class="pull-left">
						               <button type="submit" class="btn btn-default">提交</button>
						            </div>
                                    <div class="pull-right">
                                       <button type="submit" class="btn btn-default" onClick="history.back();">取消</button>
                                    </div>
				                </div>
				                
			                </form>
		                </div>          
		            </div>
                </div>
			</div>
			
		</div>
		<script src="<%=request.getContextPath()%>/resources/js/js.js" type="text/javascript" charset="utf-8"></script>
	</body>
	
	
	</script>
		<script type="text/javascript">
		
		var sposeVal = document.getElementById("acdispose").value; 
	
		var shi = document.getElementById("acdispose1").value;
		
		
		if(shi==sposeVal){ 
		    $("#acdispose1").attr("checked",true);  
		}else{  
		    $("#acdispose2").attr("checked",true);  
		}
		
	</script>
	<script type="text/javascript">
		jeDate({
			dateCell : "#actime",
			format : "YYYY-MM-DD hh:mm:ss",
			isinitVal : false,
			isTime : true, //isClear:false,
			minDate : "2010-09-19 00:00:00",
			maxDate : "2099-09-19 00:00:00",
			okfun : function(val) {
				alert(val)
			}
		})
	</script>
	
	<script language="javascript" type="text/javascript">
		    function logout(){
			   if (confirm("您确定要退出系统吗？"))
			            top.location = "<%=request.getContextPath()%>/index.jsp";
			           
			         return false;
			         
			    }
		</script>
		<!-- <script type="text/javascript">
	  function accTest(){
		var accName = document.getElementById("acname").value;
		var accSity = document.getElementById("acsite").value;
		var accTime = document.getElementById("actime").value;
		var accBru = document.getElementById("acbruise").value;
		var accDuty = document.getElementById("acduty").value;
		var accDama = document.getElementById("acdamaged").value;
		var accPun = document.getElementById("acpunish").value;
		var accPen = document.getElementById("acpenalty").value;
		var accWay = document.getElementById("acwaybill").value;
		
			if(accName==null||accName==""||accName==undefined){
				alert("请输入姓名");
				return false;
			}
			if(accSity==null||accSity==""||accSity==undefined){
				alert("请输入地点");
				return false;
			}
			if(accTime==null||accTime==""||accTime==undefined){
				alert("请选择时间");
				return false;
			}
			if(accBru==null||accBru==""||accBru==undefined){
				alert("请输入是否有人受伤");
				return false;
			}
			if(accDuty==null||accDuty==""||accDuty==undefined){
				alert("请输入事故责任");
				return false;
			}
			if(accDama==null||accDama==""||accDama==undefined){
				alert("请输入事故受损金额（元）");
				return false;
			}
			if(accPun==null||accPun==""||accPun==undefined){
				alert("请输入厂家处罚金额（元）");
				return false;
			}
			if(accPen==null||accPen==""||accPen==undefined){
				alert("请输入上级处罚金额（元）");
				return false;
			}
			if(accWay==null||accWay==""||accWay==undefined){
				alert("请输入所属运单（ID）");
				return false;
			}
	  }
	   -->
</html>
